<div class="content-section introduction">
    <div class="feature-intro">
        <h1>Textarea</h1>
        <p>Textarea is a multi-line text input element.</p>
    </div>
    <app-demoActions github="inputtextarea" stackblitz="inputtextarea-demo"></app-demoActions>
</div>

<div class="content-section implementation">
    <div class="card">
        <h5>Default</h5>
        <textarea rows="5" cols="30" pInputTextarea></textarea>

        <h5>Float Label</h5>
        <span class="p-float-label">
            <textarea id="float-input" rows="5" cols="30" pInputTextarea></textarea>
            <label for="float-input">Summary</label>
        </span>

        <h5>AutoResize</h5>
        <textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize"></textarea>
    </div>
</div>

<div class="content-section documentation">
    <p-tabView>
        <p-tabPanel header="Documentation">
            <h5>Import</h5>
<app-code lang="typescript" ngNonBindable ngPreserveWhitespaces>
import &#123;InputTextareaModule&#125; from 'primeng/inputtextarea';
</app-code>

            <h5>Getting Started</h5>
            <p>InputTextarea is applied to an input field with pInputTextarea directive.</p>

<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;textarea pInputTextarea&gt;&lt;/textarea&gt;
</app-code>

            <h5>Model Binding</h5>
            <p>A model can be bound using the standard ngModel directive.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;textarea pInputTextarea [(ngModel)]="property"&gt;&lt;/textarea&gt;
</app-code>

            <h5>AutoResize</h5>
            <p>In auto resize mode, textarea grows instead of displaying a scrollbar. When this feature is enabled, rows and cols properties
            are required to be defined.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;textarea [rows]="5" [cols]="30" pInputTextarea autoResize="autoResize"&gt;&lt;/textarea&gt;
</app-code>

            <h5>Properties</h5>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Type</th>
                            <th>Default</th>
                            <th>Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>autoResize</td>
                            <td>boolean</td>
                            <td>false</td>
                            <td>When present, textarea size changes as being typed.</td>
                        </tr>
                        <tr>
                            <td>disabled</td>
                            <td>boolean</td>
                            <td>false</td>
                            <td>When present, it specifies that the element should be disabled.</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h5>Events</h5>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Parameters</th>
                            <th>Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>onResize</td>
                            <td>event: Event object</td>
                            <td>Callback to invoke when element is resized.</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h5>Styling</h5>
            <p>Following is the list of structural style classes, for theming classes visit <a href="#" [routerLink]="['/theming']">theming page</a>.</p>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Element</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>p-inputtextarea</td>
                            <td>Textarea element</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h5>Dependencies</h5>
            <p>None.</p>
        </p-tabPanel>

        <p-tabPanel header="Source">
            <a href="https://github.com/primefaces/primeng/tree/master/src/app/showcase/components/inputtextarea" class="btn-viewsource" target="_blank">
                <span>View on GitHub</span>
            </a>
            <a href="https://stackblitz.com/edit/primeng-inputtextarea-demo" class="btn-viewsource" style="margin-left: .5em;" target="_blank">
                <span>Edit in StackBlitz</span>
            </a>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;h5&gt;Default&lt;/h5&gt;
&lt;textarea rows="5" cols="30" pInputTextarea&gt;&lt;/textarea&gt;

&lt;h5&gt;Float Label&lt;/h5&gt;
&lt;span class="p-float-label"&gt;
    &lt;textarea id="float-input" rows="5" cols="30" pInputTextarea&gt;&lt;/textarea&gt;
    &lt;label for="float-input"&gt;Summary&lt;/label&gt;
&lt;/span&gt;

&lt;h5&gt;AutoResize&lt;/h5&gt;
&lt;textarea rows="5" cols="30" pInputTextarea autoResize="autoResize"&gt;&lt;/textarea&gt;
</app-code>
        </p-tabPanel>
        <p-tabPanel header="StackBlitz">
            <ng-template pTemplate="content">
                <iframe src="https://stackblitz.com/edit/primeng-inputtextarea-demo?embed=1" style="width: 100%; height: 768px; border: none;"></iframe>
            </ng-template>
        </p-tabPanel>
    </p-tabView>
</div>
